﻿@model Weibo.Web.Models.FollowListModel

 @{
     Layout = "~/Views/Shared/_Layout.cshtml";
     IList<Group> allGroups = Groups.GetGroupsByUID(Model.CurUser.ID);
 }
 @{
     ViewBag.Title = "我关注的人 XX微博-随时随地分享身边的新鲜事儿";
 }

    @section  cssInsert{
    <link href="/Content/CSS/connect.css" type="text/css" rel="stylesheet">
    }
    @section  jsInsert{
    <script src="/Scripts/Friend.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
         App.initNameCard($("#att_wrap"));
        App.TimerFunArray.push(App.autoCompleteTimerEvent);
        App.TimerFunArray.push(App.ajaxAtWho);
        App.StartTimer();
         var searchBox=$("#fans_and_follow_filter_input").JQP_HighLineInput2({nullCon:"输入昵称或备注"}).keyup(function(e){
               if(e.which==13){
                   window.location.href="/Follow/Search?Key="+encodeURIComponent($.trim(this.value));
               }
            });
             App.autoComplete(searchBox, function (id, name) {
                window.location.href="/Follow/Search?Key="+encodeURIComponent(name);
             },"GetFollowListByKey");
             $("#fans_and_follow_filter_submit").click(function(){
                
             if(searchBox.val()=="输入昵称或备注")
             return false;
             else{
             window.location.href="/Follow/Search?Key="+encodeURIComponent($.trim(searchBox.val()));
             }
             });
                    @{
             DataContractJsonSerializer s;
                if(allGroups!=null)
                {
                    s= new DataContractJsonSerializer(allGroups.GetType());
                    using (MemoryStream ms = new MemoryStream())
                    {
                        s.WriteObject(ms, allGroups);
                @:App.FriendManage.groupList=@MvcHtmlString.Create(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
            }
            }   
                }
                

        });
    </script>
    }

            <div class="MIB_blogbody">
                <div class="MIB_mblogbgr ">
                    <div class="MIB_mblogbgl">
                        <!--右栏内容 -->
                        <div class="mainR MIB_200 MIB_txtar MIB_linkar">
                            @RenderPage("~/Views/Shared/_FollowRightNav.cshtml")
                        </div>
                        <!--/右栏内容 -->
                        <!--左栏内容 -->
                        <div class="mainL MIB_600 MIB_txtal MIB_linkal">
                            <div class="cetSearch">
                                <!-- 我的粉丝和关注页 -->
                                <!--评论区 -->
                                <div class="btmTit_wrap csTitle">
                           	<div class="lf">
                                                             昵称或备注含“@Model.Key”的人
                            							                            </div>
                            <div class="rt">
                            	<label>
                                	<input type="text" value="输入昵称或备注" id="fans_and_follow_filter_input" class="txt_s1" maxlength="20" style="color: rgb(153, 153, 153);">
                                    <a id="fans_and_follow_filter_submit" class="btn_normal btnxs" href="#"><em>搜索</em></a>
                               	</label>
                            </div>
                          
                            </div>

        <div class="chgz_tag">
                                <a href="@Model.CurUser.ID/Follow">返回我关注的全部人</a><em class="fst">&gt;</em>昵称或备注含“@Model.Key”的人(@Model.RecordCount)
                            </div>                        
                                <div class="box_gr1">
                                    <ul class="concernBox" id="att_wrap">
                                        @{
                                            if (Model.Follows != null)
                                            {
                                                foreach (Follow follow in Model.Follows)
                                                {
                                            <li class="MIB_linedot_l" onmouseover="App.showExtendBtn(this);" onmouseout="App.hideExtendBtn(this);"
											id="@follow.ID">
                                                <div class="conBox_l">
                                                    <a href="/@follow.ID" uid="@follow.ID" namecard="true" uname="@follow.NickName" >
                                                        <img title="@follow.NickName"  src="@follow.MidAvartar"></a></div>
                                                <div class="conBox_c">
                                                    <span class="name"><a uid="@follow.ID" namecard="true" uname="@follow.NickName" href="/@follow.ID" title="@follow.NickName">@follow.NickName</a>
                                                        <span extend="true" class="remark" id="remark_@{@follow.ID;}" style=" visibility:hidden">
                                                            (<a href="javascript:void(0);" onclick="App.showEditRemarkBox (this,'@follow.ID');return false;">@{@(string.IsNullOrEmpty(follow.Remark) ? "设置备注" : follow.Remark)}</a>)</span></span>
                                                    <p class="address">
                                                        <img src="/Content/Image/transparent.gif" class="small_icon @{@(follow.Sex ==TypeConfigs.GetSexFemale ? "sicon_female" : "man")}" title="@{@(follow.Sex == TypeConfigs.GetSexFemale ? "女" : "男")}">@{@Types.GetCityTypesFullName(follow.Location);}
                                                        <span>粉丝<strong>@follow.FocusedCount</strong>人</span></p>
                                                    <div class="content MIB_linkbl">
                                                        <a href="/@follow.ID" class="ms">
                                                            @{@follow.LastMContent}
                                                            (@{@(follow.LastUpdateDate != null ? DateSpan.Get(follow.LastUpdateDate.Value) : "未知")})</a>
                                                    </div>
                                                    <div class="roommate">
                                                        <a title="@Groups.GetGroupsString(follow.GroupIDs, allGroups, 14)" class="btn_privacy" action="groupselector" personid="@follow.ID" groupids="@follow.GroupIDs"
														href="javascript:void(0);"><em>@Groups.GetGroupsString(follow.GroupIDs, allGroups, 14)<img
                                                            src="/Content/Image/transparent.gif" class="small_icon down_arrow"></em></a>
                                                    </div>
                                                </div>
                                                <div class="conBox_r ">
                                                    @{
                                        if (follow.FriendShip == 1)
                                        {
                                                        <p class="mutual">
                                                            <img class="small_icon sicon_atteo" title="互相关注中" src="/Content/Image/transparent.gif"></p>
                                        }
                                                    }
                                                    <p extend="true" style="visibility:hidden" id="cancel_@{@follow.ID}">
                                                        <a href="javascript:void(0);" onclick="App.FriendManage.cancelFollow (@follow.ID,'@follow.NickName',this);return false;">
                                                            取消关注</a></p>
                                                </div>
                                                <div class="clearit">
                                                </div>
                                            </li>
                                                }
                                            }
                                        }
                                    </ul>
                                </div>
                                <div class="MIB_bobar">
                                    <!--返回顶部-->
                                    <div class="ftop lf">
                                        <a href="#">
                                            <img title="返回顶部" src="/Content/Image/transparent.gif" class="small_icon returntop">返回顶部</a>
                                    </div>
                                    <!--返回顶部-->
                                    <!--翻页-->
                                    @Html.Pager(Model.Page, Model.RecordCount, Model.PageSize)
                                    <!--翻页-->
                                </div>
                                <!--/内容区 -->
                            </div>
                        </div>
                        <!--/左栏内容 -->
                    </div>
                </div>
            </div>

@section  conSupplement{
    <div class="cetdowme" curUid="" style="position: absolute; z-index: 800;display:none;">
        @{
            if (allGroups != null)
            {
                for (int i = 0; i < allGroups.Count; i++)
                {
            <p sel="1">
                <input type="checkbox" class="labelbox" id="group_selector_item_@{@allGroups[i].ID}" /><label for="group_selector_item_@{@allGroups[i].ID}" title="@{@allGroups[i].Name}">@{@allGroups[i].Name}
                </label>
            </p>
                }
            }
        }
        <div class="MIB_linedot1">
        </div>
        <p>
            <a id="gcBtn" href="javascript:void(0);">创建新分组 </a>
        </p>
        <p class="opt" style="display: none;">
            <input type="text" />
        </p>
        <span class="error_color" style="display: none;">请不要超过8个汉字 </span>
        <p class="btn" style="display: none;">
            <a class="btn_normal btnxs" href="javascript:void(0);"><em>保存</em> </a><a class="btn_normal btnxs"
                href="javascript:void(0);"><em>取消</em> </a>
        </p>
    </div>
    <script type="text/javascript">
        App.FriendManage.initGroupSelector();
    </script>
    }